<html>
   <head>
   <link type="text/css" rel="stylesheet" href="/admin.css">
   </head>
   <body>
   <table><tr>
   <td>Id</td>
   <td>Metadata</td>
   <td>Language</td>
   <td>Months</td>
   <td>&nbsp;</td>
   </tr>
   <g:form name="addSentenceForm" url="[controller:'admin',action:'addSentence']">
   	   <tr>
       <td>&nbsp;</td>
       <td><g:textField name="metaData" value="${metaData}" /></td>
       <td><g:select    name="language" from="${['ENG', 'GER', 'SWE', 'ESP']}" /></td>
       <td><g:textField name="months" value="${months}" /></td>
       <td><g:actionSubmit value="Add" action="addSentence"/></td>
       </tr>
       <tr bgcolor="#EEEEEE">
       <td>&nbsp;</td>
       <td colspan="4"><g:textArea cols="50" name="sentence" wrap="virtual" value="${sentence}" /></td>
       </td>
       </tr>
   </g:form>
   <g:each in="${sentences}" var="num">
   	   <tr>
   	   <td>${num.id}</td>
       <td>${num.metaData}</td>
       <td>${num.language}</td>
       <td>${num.months}</td>
       <td>
       		<g:form name="updateSentenceForm_${num.id}" url="[controller:'admin',action:'editSentence']">
       			<g:hiddenField name="id" value="${num.id}" />
       			<g:actionSubmit value="Edit" action="editSentence"/>
       			<g:actionSubmit value="Delete" onclick="return confirm('Are you sure?')" action="deleteSentence"/>
       		</g:form>
       </td>
       </tr>
       <tr bgcolor="#EEEEEE">
   		<td>&nbsp;</td>
   		<td colspan="3">${num.sentence}</td>
   		<td>&nbsp;</td>
   	   </tr>
   </g:each>
   </table>
   </body>
</html>